<html>
<head>
	<script type="text/javascript">
		var aJaxURL	= "server-side/report/worker_job.action.php";		//server side folder url
		var tName	= "report";												//table name

		$(document).ready(function () {

			GetDateTimes("search_start");
			GetDateTimes("search_end");

 			$("#search_start").val(GetDateTime(2) + " 00:00");
 			$("#search_end").val(GetDateTime(2) + " 23:59");

			var start	= $("#search_start").val();
			var end		= $("#search_end").val();
			LoadTable(start, end);
		});

		function LoadTable(start, end){
			var total = [2,3];
			/* Table ID, aJaxURL, Action, Colum Number, Custom Request, Hidden Colum, Menu Array */
			GetDataTable(tName, aJaxURL, "get_list", 4, "start=" + start + "&end=" + end, 0, "", 1, "desc", total);
		}

	    $(document).on("change", "#search_start", function () {
	    	var start	= $(this).val();
	    	var end		= $("#search_end").val();
	    	LoadTable(start, end);
	    });

	    $(document).on("change", "#search_end", function () {
	    	var start	= $("#search_start").val();
	    	var end		= $(this).val();
	    	LoadTable(start, end);
	    });
    </script>
</head>

<body>
    <div id="dt_example" class="ex_highlight_row">
        <div id="container">
            <div id="dynamic">
            	<h2 align="center">შესრულებულ სამუშაოები</h2>
            	<div id="button_area">
					<div class="left" style="width: 250px;">
						<label for="search_start" class="left"
							style="margin: 5px 0 0 9px;">დასაწყისი</label> <input type="text"
							name="search_start" id="search_start" class="inpt right date"
							style="padding: 0px !important; height: 25px !important; width: 165px !important;" />
					</div>
					<div class="right" style="width: 260px;">
						<label for="search_end" class="left" style="margin: 5px 0 0 9px;">დასასრული</label>
						<input type="text" name="search_end" id="search_end"
							class="inpt right date"
							style="padding: 0px !important; height: 25px !important; width: 165px !important;" />
					</div>
				</div>
                <table class="display" id="report">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 100%;">პიროვნება</th>
                            <th class="min">დამუხტვა</th>
                            <th class="min">დატესტვა</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init">
                            </th>
                            <th>
                            	<input type="text" name="search_method" value="ფილტრი" class="search_init">
                            </th>
                            <th>
                            	<input type="text" name="search_method" value="ფილტრი" class="search_init">
                            </th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <th>&nbsp;</th>
                            <th><p align="right">ჯამი:<br/>სულ ჯამი:</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                        </tr>
                    </tfoot>
                </table>
            </div>
            <div class="spacer">
            </div>
        </div>
    </div>
</body>
</html>